<?php
    include_once("checkAuthenticationAction.php");
    include_once("../service/articleService.php");
    include_once("../util/constant.php");
    $title = $_POST["articleTitle"];
    $page = $_POST["page"];
    $content = $_POST["content"];
    $article_id = $_POST["edit_article_id"];
    $thumbnail = $_POST["thumbnail"];
    
    $result = updateArticle($title,$page, $content, $article_id,$thumbnail);
    echo "<script>window.location.href='../admin/article-detail.php?action=".EDIT_ACTION."&id=".$article_id."';</script>";
?>